package my.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableAutoConfiguration
public class Demo {
	@RequestMapping("/")
	String home() {
		System.out.println("Hello SpringBoot!");
		return "Hello World!测试哦";
	}

	@RequestMapping("/hello/{id}")
	Map<String, Object> json(@PathVariable String id) {
		System.out.println("Hello SpringBoot!" + id);
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("name", "Mike");
		return result;
	}
}
